package com.twq.utils;

import com.twq.utils.JdbcUtils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class test {
    public static void main(String[] args) {
        Connection conn = null;
        Statement st = null;
        ResultSet rs = null;
        try {
            conn = JdbcUtils.getConnection();//获取连接
            st= conn.createStatement();//获得SQL的执行对象
            String sql = "INSERT INTO tbl_administrator values(12,12)";

            int i = st.executeUpdate(sql);
            if(i>0){
                System.out.println("插入成功");

            }
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }finally {
            JdbcUtils.release(conn,st,rs);
        }

    }
}
